package com.iwunu.gateway.repository;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;

import com.iwunu.gateway.entity.GatewayWhitelist;

import io.lettuce.core.dynamic.annotation.Param;

/**
 * @author kinfeng
 * @date 2021/3/9 10:00 AM
 * @desc
 */
@Repository
public interface WhiteListRepository extends JpaRepository<GatewayWhitelist, Long> , JpaSpecificationExecutor<GatewayWhitelist> {
    @Query(value="select i from GatewayWhitelist i where i.gMac=:gmac and i.lMac=:mac and isDel = 0")
    GatewayWhitelist selectWhiteListByMac(@Param("gmac") String gmac,@Param("mac") String mac);
    

}
